From 126fd46d2114cfc3e53c0ff30250e16e35c9ef3c Mon Sep 17 00:00:00 2001 From: Alastair Tse Date: Thu, 21 Dec 2006 14:49:19 +0000 Subject: [PATCH] [XEND] Xen API commands cleanup. Signed-off-by: Alastair Tse --- tools/python/xen/xend/XendAPI.py | 70 ++++++++++++------------- tools/python/xen/xend/XendDomainInfo.py | 5 +- 2 files changed, 36 insertions(+), 39 deletions(-) diff --git a/tools/python/xen/xend/XendAPI.py b/tools/python/xen/xend/XendAPI.py index c06ca0d805..d475790280 100644 --- a/tools/python/xen/xend/XendAPI.py +++ b/tools/python/xen/xend/XendAPI.py @@ -893,55 +893,55 @@ class XendAPI: dom.setName(label) return xen_api_success_void() - def VM_set_name_description(self, session, vm_ref): + def VM_set_name_description(self, session, vm_ref, desc): dom = XendDomain.instance().get_vm_by_uuid(vm_ref) - return xen_api_success_void() + return xen_api_todo() - def VM_set_user_version(self, session, vm_ref): + def VM_set_user_version(self, session, vm_ref, ver): dom = XendDomain.instance().get_vm_by_uuid(vm_ref) - return xen_api_success_void() + return xen_api_todo() - def VM_set_is_a_template(self, session, vm_ref): + def VM_set_is_a_template(self, session, vm_ref, is_template): dom = XendDomain.instance().get_vm_by_uuid(vm_ref) - return xen_api_success_void() + return xen_api_todo() - def VM_set_memory_dynamic_max(self, session, vm_ref): + def VM_set_memory_dynamic_max(self, session, vm_ref, mem): dom = XendDomain.instance().get_vm_by_uuid(vm_ref) - return xen_api_success_void() + return xen_api_todo() - def VM_set_memory_dynamic_min(self, session, vm_ref): + def VM_set_memory_dynamic_min(self, session, vm_ref, mem): dom = XendDomain.instance().get_vm_by_uuid(vm_ref) - return xen_api_success_void() + return xen_api_todo() - def VM_set_VCPUs_policy(self, session, vm_ref): + def VM_set_VCPUs_policy(self, session, vm_ref, policy): dom = XendDomain.instance().get_vm_by_uuid(vm_ref) - return xen_api_success_void() + return xen_api_todo() - def VM_set_VCPUs_params(self, session, vm_ref): + def VM_set_VCPUs_params(self, session, vm_ref, params): dom = XendDomain.instance().get_vm_by_uuid(vm_ref) - return xen_api_success_void() + return xen_api_todo() - def VM_set_VCPUs_features_force_on(self, session, vm_ref): + def VM_set_VCPUs_features_force_on(self, session, vm_ref, features): dom = XendDomain.instance().get_vm_by_uuid(vm_ref) - return xen_api_success_void() + return xen_api_todo() - def VM_set_VCPUs_features_force_off(self, session, vm_ref): + def VM_set_VCPUs_features_force_off(self, session, vm_ref, features): dom = XendDomain.instance().get_vm_by_uuid(vm_ref) - return xen_api_success_void() + return xen_api_todo() - def VM_set_actions_after_shutdown(self, session, vm_ref): + def VM_set_actions_after_shutdown(self, session, vm_ref, action): dom = XendDomain.instance().get_vm_by_uuid(vm_ref) - return xen_api_success_void() + return xen_api_todo() - def VM_set_actions_after_reboot(self, session, vm_ref): + def VM_set_actions_after_reboot(self, session, vm_ref, action): dom = XendDomain.instance().get_vm_by_uuid(vm_ref) - return xen_api_success_void() + return xen_api_todo() - def VM_set_actions_after_suspend(self, session, vm_ref): + def VM_set_actions_after_suspend(self, session, vm_ref, action): dom = XendDomain.instance().get_vm_by_uuid(vm_ref) - return xen_api_success_void() + return xen_api_todo() - def VM_set_actions_after_crash(self, session, vm_ref): + def VM_set_actions_after_crash(self, session, vm_ref, action): dom = XendDomain.instance().get_vm_by_uuid(vm_ref) return xen_api_success_void() @@ -965,27 +965,27 @@ class XendAPI: def VM_set_platform_std_VGA(self, session, vm_ref): dom = XendDomain.instance().get_vm_by_uuid(vm_ref) - return xen_api_success_void() + return xen_api_todo() - def VM_set_platform_serial(self, session, vm_ref): + def VM_set_platform_serial(self, session, vm_ref, serial): dom = XendDomain.instance().get_vm_by_uuid(vm_ref) - return xen_api_success_void() + return xen_api_todo() - def VM_set_platform_localtime(self, session, vm_ref): + def VM_set_platform_localtime(self, session, vm_ref, localtime): dom = XendDomain.instance().get_vm_by_uuid(vm_ref) - return xen_api_success_void() + return xen_api_todo() - def VM_set_platform_clock_offset(self, session, vm_ref): + def VM_set_platform_clock_offset(self, session, vm_ref, clock_offset): dom = XendDomain.instance().get_vm_by_uuid(vm_ref) - return xen_api_success_void() + return xen_api_todo() - def VM_set_platform_enable_audio(self, session, vm_ref): + def VM_set_platform_enable_audio(self, session, vm_ref, enable_audio): dom = XendDomain.instance().get_vm_by_uuid(vm_ref) - return xen_api_success_void() + return xen_api_todo() def VM_set_otherConfig(self, session, vm_ref): dom = XendDomain.instance().get_vm_by_uuid(vm_ref) - return xen_api_success_void() + return xen_api_todo() # class methods def VM_get_all(self, session): diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index 27dcce7e71..416c0e67fe 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -1831,8 +1831,7 @@ class XendDomainInfo: return self.info.get('memory_dynamic_max', 0) def get_memory_dynamic_min(self): return self.info.get('memory_dynamic_min', 0) - - + def get_vcpus_policy(self): sched_id = xc.sched_id_get() if sched_id == xen.lowlevel.xc.XEN_SCHEDULER_SEDF: @@ -1847,8 +1846,6 @@ class XendDomainInfo: return XEN_API_VM_POWER_STATE[self.state] def get_platform_std_vga(self): return self.info.get('platform_std_vga', False) - def get_platform_keymap(self): - return '' def get_platform_serial(self): return self.info.get('platform_serial', '') def get_platform_localtime(self): -- 2.30.2